/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.model.disc.parametricintegration;

import java.util.ArrayList;

import br.ufmg.dees.insane.model.disc.integrationpoint.AreaGaussPoint;
import br.ufmg.dees.insane.model.disc.integrationpoint.IntegrationPoint;
import br.ufmg.dees.insane.model.disc.shape.T10;

/**
*A class representing the parametric integration for ten nodes area elements.<p>
*
*@author Lucas, Marcelo & Pitangueira, Roque
*@version 1.0
*@since August 2004
*/

public class PIT10 extends Area
{
	/** Constructs parametric integration for ten nodes area elements, set its shape to T10, set its type to PIT10.*/
	public PIT10()
	{
		this.setShape(new T10());
		this.setType("PIT10");
		pointForces.clear();
	}
	
	/** Constructs parametric integration for ten nodes area elements, set its shape to T10, set its type to PIT10 and receive the element thickness.*/
	public PIT10(double t)
	{
		this.setShape(new T10());
		this.setType("PIT10");
		this.setElmThickness(t);		
		pointForces.clear();
	}
	
//********************************************************************************
	
	/** Return the integration order of this PIT10.
	*@return the integration order of this PIT10.
	*/
	public int getIntegrationOrder()
	{
		return 6;
	}
	
//********************************************************************************
	
	/** Return the integration points of this Equivalent Nodal Load.
	*@return the integration points of this Equivalent Nodal Load.
	*/
	protected ArrayList<IntegrationPoint> getIntegrationPoints()
	{
		ArrayList<IntegrationPoint> integrationPoints = new ArrayList<IntegrationPoint>();
		for(int i = 0; i < (this.getIntegrationOrder()); i++)
		{
			IntegrationPoint ip = new AreaGaussPoint();
			ip.setCoord1((this.getIntegrationOrder()-1),(3*i));
			ip.setCoord2((this.getIntegrationOrder()-1),(3*i+1));
			ip.setWeight((this.getIntegrationOrder()-1),i);
			integrationPoints.add(ip);
		}
		return integrationPoints;
	}
	
//********************************************************************************
}
